package com.msh.starter.ip.analysis.config;

import com.msh.frame.client.interfaces.IClassLoadLog;
import com.msh.starter.ip.analysis.instance.Ip2regionIpCountry;
import com.msh.starter.ip.analysis.inteface.IIpCountry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class IpAnalysisAutoConfiguration implements IClassLoadLog {

    @Bean
    public IIpCountry ip2regionIpCountry(){
        return new Ip2regionIpCountry();
    }

    @Override
    public String logInfo() {
        StringBuilder sb = new StringBuilder().append("----执行类 ")
                .append(IpAnalysisAutoConfiguration.class)
                .append("\r\n")
                .append("--------加载类 ")
                .append(Ip2regionIpCountry.class)
                .append("(IIpCountry)\r\n");
        return sb.toString();
    }
}
